/*
 * @Author: 1243sd 782012816@qq.com
 * @Date: 2024-03-28 21:03:43
 * @LastEditors: 1243sd 782012816@qq.com
 * @LastEditTime: 2024-06-26 23:38:48
 * @FilePath: \frontend-ykt-admin\src\router\modules\goodsRouter.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Descripttion: 商品路由
 * @Author: xp
 * @Date: 2022-09-02 17:25:31
 */
import Layout from '@/layout'
import Middle from '@/layout/middle'

const router = [
  // {
  //   path: '/testPage',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/testPage/Index'),
  //       name: 'testPage',
  //       meta: { title: 'testPage', icon: 'tab' }
  //     }
  //   ]
  // },
  
  /************************* 设置 ****************************/ 
  // 设置
  {
    path: '/',
    component: Layout,
    redirect: '/setting/banner',
    name: '首页设置',
    meta: {
      title: '首页设置',
      affix: true,
      permission: 18
    },
    children: [
      // 商品
      {
        path: '/setting/product',
        component: () => import("@/views/setting/product/index.vue"),
        name: '商品列表',
        meta: {
          title: '商品列表',
          keepAlive: true,
          permission: 24
        },
      },
      {
        path: '/setting/product/detail',
        component: () => import("@/views/setting/product/detail.vue"),
        name: '商品详情',
        hidden: true,
        meta: {
          title: '商品详情',
          activeMenu: '/setting/product',
        },
      },
      // 案例
      {
        path: '/setting/case',
        component: () => import("@/views/setting/case/index.vue"),
        name: '案例列表',
        meta: {
          title: '案例列表',
          keepAlive: true,
          permission: 29  
        },
      },
      {
        path: '/setting/case/detail',
        component: () => import("@/views/setting/case/detail.vue"),
        name: '案例详情',
        hidden: true,
        meta: {
          title: '案例详情',
          activeMenu: '/setting/case',
        },
      },
    ]
  },

  /************************* 学校管理 ****************************/ 
  {
    path: '/school',
    component: Layout,
    redirect: '/school/index',
    name: '学校管理',
    meta: {
      title: '学校管理',
      affix: true,
      permission: 8
    },
    children: [
      {
        path: '/school/index',
        component: () => import("@/views/school/index.vue"),
        name: '学校管理',
        meta: {
          title: '学校管理',
          keepAlive: true,
        },
      }
    ]
  },
  /************************* 广告管理 ****************************/ 
  {
    path: '/banner',
    component: Layout,
    redirect: '/banner/index',
    name: '广告管理',
    meta: {
      title: '广告管理',
      affix: true,
      permission: 8
    },
    children: [
      {
        path: '/banner/index',
        component: () => import("@/views/banner/index.vue"),
        name: '广告管理',
        meta: {
          title: '广告管理',
          keepAlive: true,
        },
      },
      {
        path: '/banner/detail',
        component: () => import("@/views/banner/detail.vue"),
        name: '广告详情',
        hidden: true,
        meta: {
          title: '广告详情',
          activeMenu: '/banner/index',
        },
      },
    ]
  },
   /************************* 后台用户管理 ****************************/ 
  // 用户管理
  {
    path: '/user',
    component: Layout,
    redirect: '/user/index',
    name: '用户管理',
    meta: {
      title: '用户管理',
      permission: 1
    },
    children: [
      {
        path: '/user/index',
        component: () => import("@/views/user/index.vue"),
        name: '后台用户列表',
        meta: {
          title: '后台用户列表',
          keepAlive: true,
          icon: 'el-icon-user',
        },
      },
    ]
  },
  /************************* 积分流水管理 ****************************/ 
  // 积分流水
  {
    path: '/points',
    component: Layout,
    redirect: '/points/index',
    name: '积分流水管理',
    meta: {
      title: '积分流水管理',
      affix: true,
      permission: 12
    },
    children: [
      {
        path: '/points/index',
        component: () => import("@/views/points/index.vue"),
        name: '积分流水记录',
        meta: {
          title: '积分流水记录',
          keepAlive: true,
        },
      },
    ]
  },
  /************************* 提现申请列表 ****************************/ 
  // 提现申请列表
  {
    path: '/withdraw',
    component: Layout,
    redirect: '/withdraw/index',
    name: '提现申请管理',
    meta: {
      title: '提现申请管理',
      affix: true,
      permission: 14
    },
    children: [
      {
        path: '/withdraw/index',
        component: () => import("@/views/withdraw/index.vue"),
        name: '提现申请列表',
        meta: {
          title: '提现申请列表',
          keepAlive: true,
        },
      },
    ]
  },

  /************************* 订单管理 ****************************/ 
  // 预约订单管理
  {
    path: '/order',
    component: Layout,
    redirect: '/order/index',
    name: '订单管理',
    meta: {
      title: '订单管理',
      affix: true,
      permission: 34
    },
    children: [
      {
        path: '/order/index',
        component: () => import("@/views/order/index.vue"),
        name: '预约订单列表',
        meta: {
          title: '预约订单列表',
          keepAlive: true,
        },
      },
    ]
  },

 
  
 

]
export default router
